<div class="row">
    <div class="span3 bs-docs-sidebar ">
    <*include file="<*$controller*>/location.tpl"*>
    </div>
  <link rel="stylesheet" href="/css/lightbox.css" media="screen"/>
  
    <script language="JavaScript">  
	function isFF()
	{
	return navigator.userAgent.indexOf("Firefox")!=-1;
	} 
	
	function tz(id,avatar){
		if( isFF() ){
		   window.location=avatar;
		}else{
			showvideo(id);
		}
	}
	</script>
    
	<style type="text/css">
	li.open{  background:#aceeff;}
	.weibo{ font-size:14px; text-align:left; margin:0px; margin-bottom:30px; list-style:none;}
	.weibo li { margin-left:0px;  padding:10px;  border-top:1px solid #CCC;}
	.weibo_content .title .titles{ font-weight:bolder; font-size:14px;}
	.weibo_content .content{ padding-top:5px; padding-bottom:5px; line-height:1.5em;}
	.weibo_content .picture{ padding-bottom:10px;}
	.weibo_content .detailed .time{ margin-right:5px; color:#000;}
	.weibo_content .detailed .object{  text-align:center; width:20px;color:#000;}
	.weibo_content .detailed .pinglun{  text-align:center; width:20px;color:#000;}
	.weibo_content .detailed .zan{ text-align:center; width:20px;color:#000;}
	.weibo_content .detailed .come a{color:#000;}
	.example-image{ margin-right:1px;}
	</style> 
  <div class="span9">
   <div class="clearfix txtleft search" style="background-color:#f8f8f8; padding:10px; margin:10px 0px;"> 
      <form action="/<*$controller*>/articlelist" method="get"   name="form1" class="form-horizontal">       
		  机构:<select id="jigou" name="groups" onchange="getSchool(this.value)"></select>
          校园:<select id="school" name="school" onchange="getClass(this.value)" ></select> 
          班级:<select id="class1" name="class" ></select>  
         <input type="submit" class="btn btn-success"  value="查询"  >
      </form>
	</div>	 
    
    <div class="span8">
    <*if $articlelist|@count neq 0*>
            <ul class="weibo">
            <p style="font-size:18px;"><*$schoolname*> >> <*$classname*></p>
              <li style="border-top:none;"><*$page*></li>
			  <*foreach from=$articlelist item=item key =key name=foo*> 
            	<li onmouseout="document.getElementById('deletepic_<*$item.articleid*>').style.display='none';" onmouseover="document.getElementById('deletepic_<*$item.articleid*>').style.display='block';">
                	<div class="weibo_content">
                    	<div class="title"><span class="titles"><*$item.title*></span>
                        <span title="删除此动态" id="deletepic_<*$item.articleid*>" style=" display:none;float:right;"><a href="javascript:deleteit(<*$item.articleid*>,<*$groupid*>,<*$schoolid*>,<*$uid_class*>,<*$pagenum*>)"><img src="/images/xiao_close.png" /></a></span>
                        </div>
                        <div class="content" ><*$item.content*></div>
                        <div class="picture">
                              <*if $item.filecount*>
                                <*foreach from=$item.filecount item=item1 key =key1 *>
                                <*if $item1.fext <> 'mp4'*>
                                    <div style="position:relative;float:left; padding:5px 5px 0px 0px; margin:0px 8px 8px 0px;">
                                        <a class="example-image-link" href="<*$item1.avatar*>.small.jpg" data-lightbox="example-set" >
                                            <img  class="example-image" src="<*$item1.avatar*>.tiny.jpg" width="75" />
                                        </a>
                                    </div>
                                <*else*>
                                    	<a href="javascript:tz('<*$item1.articlefilesid*>','<*$item1.avatar*>')" >
                                        <div style="position:relative; cursor:pointer"  id="img<*$item1.articlefilesid*>">
                                        	<img src="<*$item1.avatar*>.jpg" width="150"  />
                                        	<span style="position:absolute; background:url('/img/bigplay.png') no-repeat; background-position:24px 0px;width:150px;height:100px;top:33px;left:0px" ></span>
                                        </div>
                                        </a>
                                        
                                    </a>
								<*/if*>
                                
                                <*/foreach*>	
                             <*else*>
                             	<span>没有图片！</span>
                             <*/if*>
                        </div>
                        <div style="clear:both;"></div>
                        <div class="detailed clearfix">
                        	<span class="time"><*$item.addtime*></span>
                            &nbsp;&nbsp;来自&nbsp;<span class="come" style="color:#F66; text-decoration:none;" ><*$item.teachername*></span>&nbsp;&nbsp;
                            <span title="照片分类">
                            <*if $item.tag_desc.0*>
                                <*foreach from=$item.tag_desc item=item2 key =key2 *>
                                <*$item2*>
                                <*/foreach*>
                            <*else*>无<*/if*>
                            </span>
                            <div style="float:right">
                                <a <*if count($item.people) eq 0*>href="#"<*else*>href="#myModal" onclick="javascript:seeit('<*$item.name*>')"<*/if*> role="button" class="btn btn-primary btn-small" data-toggle="modal"><i class="icon-user icon-white"></i> <*count($item.people)*></a>				
                        	</div>
                    	</div>
                </li>
              <*/foreach*>
              <li><*$page*></li>
            </ul>
    
    <*/if*>
	<*if !$articlelist && $uid_class*><div style="clear:both; margin-left:130px; padding-top:20px;">暂时没有已发布的日志！</div><*/if*>  
</div>
</div>
</div>
<script src="/js/lightbox-2.6.min.js"></script>
<script src="/js/bootstrap-modal.js"></script>
<!-- Modal -->
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">接收对象列表</h3>
  </div>
  <div class="row">
  <div class="modal-body span5">
       <div id="show" style="padding:50px 5px;"></div>
  </div>
  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
  </div>
</div>
</div>
<script src="/js/jquery-1.4.1.min.js"></script>

<script type="text/javascript">

	function showvideo(articlefilesid)
	{
	   window.location='/<*$controller*>/articlelistshowvideo/articlefilesid/'+articlefilesid;
	}


function chooseit(adid,groupid,schoolname)
{
   window.location='/<*$controller*>/<*$action*>/schoolid/'+adid+'/groupid/'+groupid;
}

function seeit(adid)
{
	$("#show").html(adid);
}


function deleteit(adid,gid,sid,cid,page)
{
  if(confirm("删除将不能恢复")){
   window.location='/<*$controller*>/deletearticle/adid/'+adid+'/groupid/'+gid+'/sid/'+sid+'/cid/'+cid+'/page/'+page;
  }
}

function editit(adid,gid,sid,cid,page)
{
   window.location='/<*$controller*>/editarticle/adid/'+adid+'/groupid/'+gid+'/sid/'+sid+'/cid/'+cid+'/page/'+page;
}
       function   ajax_post(){ 
	    var groupsid="<*$groups*>"; 
        $.post("/<*$controller*>/groups/",{"jigouid":groupsid},function(data,statusText){ 
			 $("#jigou").append(data); 
        });  
	 } 
	  
	  $("#jigou").change(function(){
           // $("#city option:gt(0)").remove();  //清空所有城市的信息
            //$("#county option:gt(0)").remove();  //清空所有县级的信息
            var id = this.value;
			var schoolid="<*$schoolid*>";  
			  
            $.post("/<*$controller*>/schoollist/",{"id":id,"sid":schoolid},function(data,statusText){
                 $("#school").html('');
                 $("#school").append(data);
            
            });
        });
		
		$("#school").change(function(){
           // $("#city option:gt(0)").remove();  //清空所有城市的信息
            //$("#county option:gt(0)").remove();  //清空所有县级的信息
            var sid = this.value; 
            $.post("/<*$controller*>/classlist/",{"id":sid},function(data,statusText){
				 
                 $("#class1").html('');
                 $("#class1").append(data);
            
            });
        });
		
	
	 window.onload=function(){
	    ajax_post(); 
	 if( '<*$groups*>'+0 != 0 ){ 
	        
			var id = '<*$groups*>'; 
			var sid = '<*$schoolid*>';  
			 
			$.post("/<*$controller*>/schoollist/",{"id":id,"sid":sid},function(data,statusText){
				 $("#school").html('');
				 $("#school").append(data); 
				});
	    } 
          
	 if('<*$schoolid*>'+0 != 0){   
		   var id = '<*$schoolid*>'; 
		   var cid='<*$classid*>';
			$.post("/<*$controller*>/classlist/",{"id":id,"cid":cid},function(data,statusText){ 
				 $("#class1").html('');
				 $("#class1").append(data); 
				}); 
		   
	 }/* */

 } 
	
</script>

